﻿using System;
using System.Collections.Generic;
//
namespace PerceptiveMCAPI.Types
{
	public class listMemberInfoResults
	{
		public int success { get; set; }
		public int errors { get; set; }
		public List<MemberInfo> data { get; set; }
		public List<ErrorInfo> errordata { get; set; }
		//
		public listMemberInfoResults()
		{
			data = new List<MemberInfo>();
			errordata = new List<ErrorInfo>();
		}
		//-------------------------------------------------
		public class MemberInfo
		{
			public string id { get; set; }
			public string email { get; set; }
			public EnumValues.emailType email_type { get; set; }
			public Dictionary<string, object> merges { get; set; }
			public List<interestGroupings> groupings { get; set; }
			public EnumValues.listMembers_status status { get; set; }
			public string ip_opt { get; set; }
			public string ip_signup { get; set; }
			public int member_rating { get; set; }
			public string campaign_id { get; set; }
			public Dictionary<string, EnumValues.listMembers_status> lists { get; set; }
			public DateTime timestamp { get; set; }
			public DateTime info_changed { get; set; }
			public int web_id { get; set; }
			//
			public geo_data geo { get; set; }
			public List<client_data> clients { get; set; }
			public List<segment> static_segments { get; set; }
			// 
			public MemberInfo()
			{
				email_type = EnumValues.emailType.NotSpecified;
				merges = new Dictionary<string, object>();
				groupings = new List<interestGroupings>();
				status = EnumValues.listMembers_status.NotSpecified;
				lists = new Dictionary<string, EnumValues.listMembers_status>();
				timestamp = DateTime.MinValue;
				info_changed = DateTime.MinValue;
				//
				geo = new geo_data();
				clients = new List<client_data>();
				static_segments = new List<segment>();
			}
			//
			public class geo_data
			{
				public double latitude { get; set; }
				public double longitude { get; set; }
				public int gmtoff { get; set; }
				public int dstoff { get; set; }
				public string timezone { get; set; }
				public string countrycode { get; set; }
				public string region { get; set; }
			}
			public class client_data
			{
				public string name { get; set; }
				public string icon_url { get; set; }
			}

			public class segment
			{
				public int id { get; set; }
				public string name { get; set; }
				public DateTime added { get; set; }
				//
				public segment()
				{
					added = DateTime.MinValue;
				}
			}
			// -------------------------------
		}
		//-------------------------------------------------
		public class ErrorInfo
		{
			public string email { get; set; }
			public string error { get; set; }
		}
	}
}
